package com.ruoyi.train.service.impl;

import com.ruoyi.train.domain.JyTrainingSchoolCourseMaterialSpecs;
import com.ruoyi.train.mapper.JyTrainingSchoolCourseMaterialSpecsMapper;
import com.ruoyi.train.service.IJyTrainingSchoolCourseMaterialSpecsService;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;

import java.util.Collections;
import java.util.List;

/**
 * 培训课程物资套餐Service业务层处理
 *
 * @author aulbrother
 * @date 2024-04-06
 */
@Service
@RequiredArgsConstructor
public class JyTrainingSchoolCourseMaterialSpecsServiceImpl implements IJyTrainingSchoolCourseMaterialSpecsService {
    private final JyTrainingSchoolCourseMaterialSpecsMapper jyTrainingSchoolCourseMaterialSpecsMapper;

    /**
     * 查询培训课程物资套餐
     *
     * @param id 培训课程物资套餐主键
     * @return 培训课程物资套餐
     */
    @Override
    public JyTrainingSchoolCourseMaterialSpecs selectJyTrainingSchoolCourseMaterialSpecsById(Long id) {
        return jyTrainingSchoolCourseMaterialSpecsMapper.selectJyTrainingSchoolCourseMaterialSpecsById(id);
    }

    /**
     * 查询培训课程物资套餐列表
     *
     * @param jyTrainingSchoolCourseMaterialSpecs 培训课程物资套餐
     * @return 培训课程物资套餐
     */
    @Override
    public List<JyTrainingSchoolCourseMaterialSpecs> selectJyTrainingSchoolCourseMaterialSpecsList(JyTrainingSchoolCourseMaterialSpecs jyTrainingSchoolCourseMaterialSpecs) {
        return jyTrainingSchoolCourseMaterialSpecsMapper.selectJyTrainingSchoolCourseMaterialSpecsList(jyTrainingSchoolCourseMaterialSpecs);
    }

    /**
     * 修改培训课程物资套餐
     *
     * @param jyTrainingSchoolCourseMaterialSpecs 培训课程物资套餐
     * @return 结果
     */
    @Override
    public int updateJyTrainingSchoolCourseMaterialSpecs(JyTrainingSchoolCourseMaterialSpecs jyTrainingSchoolCourseMaterialSpecs) {
        return jyTrainingSchoolCourseMaterialSpecsMapper.updateJyTrainingSchoolCourseMaterialSpecs(jyTrainingSchoolCourseMaterialSpecs);
    }

    @Override
    public List<JyTrainingSchoolCourseMaterialSpecs> selectJyTrainingSchoolCourseMaterialSpecsByCourseId(Long courseId) {
        return jyTrainingSchoolCourseMaterialSpecsMapper.selectJyTrainingSchoolCourseMaterialSpecsByCourseId(courseId);
    }
}
